package com.xhdx.modules.boot.web.message;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 分页参数类
 *
 * @author dongdongchen
 * @date 2020-04-17
 **/
@Data
public class PageParameter implements Serializable {

    private static final long serialVersionUID = -3445062661825141157L;

    public static final int DEFAULT_PAGE_SIZE = 20;

    @ApiModelProperty("pageSize,每页大小默认20")
    private int pageSize;

    @ApiModelProperty("currentPage,当前页")
    private int currentPage;

    @ApiModelProperty("totalPage,总页数")
    private int totalPage;

    @ApiModelProperty("totalCount,总个数")
    private int totalCount;


    public PageParameter() {
        this.currentPage = 1;
        this.pageSize = DEFAULT_PAGE_SIZE;
    }


    public PageParameter(int pageSize, int currentPage) {
        this.pageSize = pageSize;
        this.currentPage = currentPage;
    }
}
